import http from "@/utils/http";


export const getTreeTradeCategoryApi = () => {
  return http({
    url: "trade/tradeCategory/getTree",
  }
  )
};


export const refreshTradeCategoryApi = () => {
  return http({
    url: "trade/tradeCategory/refresh",
    method:"POST"
  }
  )
};


export const getPageTradeGoodsApi = (data) => {
  return http({
    url: "trade/tradeGoods/getPage",
    method:"GET",
    params:{
      pageNum: data.pageNum,
      pageSize: data.pageSize,
      goodsName: data.goodsName,
    }
  }
  )
};


export const refreshTradeGoodsApi = () => {
  return http({
    url: "trade/tradeGoods/refresh",
    method:"POST"
  }
  )
};

export const getPageTradeUnitsApi = (data) => {
  return http({
    url: "trade/tradeUnit/getPage",
    method:"GET",
    params:{
      pageNum: data.pageNum,
      pageSize: data.pageSize,
    }
  }
  )
};


export const refreshTradeUnitApi = () => {
  return http({
    url: "trade/tradeUnit/refresh",
    method:"POST"
  }
  )
};


export const getPageTradeQuotationApi = (data) => {
  return http({
    url: "trade/tradeQuotation/getPage",
    method:"GET",
    params:{
      pageNum: data.pageNum,
      pageSize: data.pageSize,
    }
  }
  )
};


export const refreshTradeQuotationApi = () => {
  return http({
    url: "trade/tradeQuotation/refresh",
    method:"POST"
  }
  )
};


export const getPageTradeWarehouseApi = (data) => {
  return http({
    url: "trade/tradeWarehouse/getPage",
    method:"GET",
    params:{
      pageNum: data.pageNum,
      pageSize: data.pageSize,
    }
  }
  )
};


export const refreshTradeWarehouseApi = () => {
  return http({
    url: "trade/tradeWarehouse/refresh",
    method:"POST"
  }
  )
};
